/**
 * Author: Dmitry Ustimov
 * Date: 5/11/13
 * Time: 9:29 PM
 */

package com.gmail.dmitryustimov.ms.java7.composite.classic.work.demo.structure1_16_256_256;

import java.util.ArrayList;
import java.util.List;

public abstract class Component {

    protected List<Component> components;

    public Component() {
        components = new ArrayList<>();
    }

    public void add(Component component) {
        components.add(component);
    }

    public void remove(Component component) {
        components.remove(component);
    }

    public abstract void doAction();
    public abstract boolean isComposite();
}
